-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Postgresql Qgis Project versioning #64352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Postgresql Qgis Project versioning #64352
Conversation
|
This is a redo of #63663 which was kind of messed up by rebase. |
🪟 Windows Qt6 buildsDownload Windows Qt6 builds of this PR for testing. 🍎 MacOS Qt6 buildsDownload MacOS Qt6 builds of this PR for testing. |
… previously it only work correctly if the schema was populated
uclaros
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last ultra minor comment!
Co-authored-by: Stefanos Natsis <uclaros@gmail.com>
|
I think the name of the feature is misleading. This versioning only keeps the last 10 states which cannot be changed, and versions cannot be deleted or renamed, etc. I think the name auto backup would be a much better fit for this functionality. |
This is definitely not a backup! Deleting a project will also delete all previous versions, which is something you would not want from a backup! Having said that, the 10 states is not a value set in stone, it's just what we thought was a sensible default value so that we do not keep huge amounts of unnecessary projects in the database. |
|
This pull request has been tagged for the changelog.
You can edit the description. Format available for credits
Thank you! |
Description
This allows storing older versions of QGIS projects in PostgreSQL. The process is mostly handled by a function and a trigger in the DB.
There are two places to handle the turning on versions of projects and loading previous versions.
Browser
On schema, user has option to enable the feature (with confirmation dialog). The action is disabled if the versioning is already active for the schema.

On project user either has option to allow versioning on the parent schema of the project
If the versioning is already active the user can see the versions of the project.
Open From.../Save To...
In those menus the user can also enable the feature and select previous version to load.
When loading QGIS project from schema that has versions activated the user can select older version of the project to load, by selecting it in the QTableWidget. If nothing is selected there the active version of QGIS project is loaded.
Fixes #62299
Funded by: Ocean Winds